<?PHP

	class tpl_login {
		
		public static function login_page($usernames_online,$stats_age,$form){
			
			$form_html = tpl_form::printform($form);
			$submit = tpl_form::submitbutton($GLOBALS['LANG']->lang_intro->login);
			
			$users_online_count = count($usernames_online);
			
			if(empty($usernames_online))
				$online_list = '<i>'.$GLOBALS['LANG']->lang_intro->no_users.'</i>';
			else
				$online_list = implode(', ',$usernames_online);
			
			return	tpl_globals::header() .
				tpl_globals::global_styles_shared() .
				tpl_globals::outer_global_styles() .
				tpl_globals::welcome_header('login') .
				tpl_globals::form_styles2() .
				<<<EOV
<script type='text/javascript'>
	window.onload = function(){ document.getElementById('lgnusername').focus() };
</script>
<div style='width: 400px; float: left; width: 49%;'>
	<form action='./index.php' method='post' accept-charset='UTF-8'>
	{$form_html}
	<div class='form_container'>
		<div class='row end'>
			{$submit}
		</div>
	</div>
	</form>
</div>
<div style='width: 49%; float: right;' class='form_container'>
	<div class='row title'>
		{$GLOBALS['LANG']->lang_intro->news}
	</div>
	<div class='row even' id='curevent'>{$GLOBALS['OUTPUT']->settings['login_page_news']}</div>
</div>
<div style='clear: both'>
	<br />
	<div class='form_container'>
		<div class='row title'>
			{$GLOBALS['LANG']->lang_intro->who_is_online}: {$users_online_count} <span style='font-size: 10px;'>({$stats_age} {$GLOBALS['LANG']->lang_intro->sec_since_last_update})</span>
		</div>
		<div class='row even' id='curevent'>$online_list</div>
	</div>
</div>
EOV
.
				tpl_globals::welcome_footer() .
				tpl_globals::footer();
				
		}
		
	}

?>